<div id="hp_intro"><%= @page_title %></div>
<p>
<%= render :partial => "priorities/form" %>
<p>	
<% if current_government.has_official? %>

	<% if params[:action] == 'not_obama' %>
	<%= t('priorities.not_official.intro', :official_user_name => current_government.official_user.name)%>
	<p>
	<% elsif params[:action] == 'obama' %>
	<%= t('priorities.official.intro', :official_user_name => current_government.official_user.name)%>
	<p>
	<% elsif params[:action] == 'obama_opposed' %>
	<%= t('priorities.official_opposed.intro', :official_user_name => current_government.official_user.name)%>
	<p>
	<% end %>
	
<% end %>

<% if params[:action] == 'yours_created' %>
	<%= t('priorities.yours_created.intro')%>
	<p>
<% end %>

<% if @priorities.any? %>

	<table border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td align="right" style="padding-right: 5px;"><span class="table_header"><%= t('rank') %></span></td>
			<td style="padding-left: 3px;"><span class="table_header"><%= t('time.wk') %></span></td>
			<td style="padding-left: 3px;"><span class="table_header"><%= t('time.mo') %></span></td>
			<td style="padding-left: 7px; padding-bottom: 2px;"><nobr><%= will_paginate @priorities %></nobr></td>
			<td></td>
			<td align="right" width="100%"><%= rss_url(@rss_url) %></td>	
		</tr>
	<% for priority in @priorities %>
		<% if @endorsements %>
			<% endorsement = @endorsements.detect {|e| e.priority_id == priority.id } %>
		<% end %>
		<tr>
			<%= render :partial => "priorities/rank_week_month", :locals => {:priority => priority } %>
			<td valign="top" style="padding-left: 8px;" colspan="3">
			<div id="priority_<%= priority.id %>" class="priority_listing">
				<%= render :partial => "priorities/listing", :locals => {:priority => priority, :endorsement => endorsement, :value => 0} %>
			</div>
			</td>
		</tr>
	<% end %>

	</table>
	<p>
	<%= will_paginate @priorities %>

	<% if params[:action] == 'yours_created' %>
		<p><%= t('priorities.yours_created.outro')%>
	<% end %>


<% end %>